﻿using ServerBase.Client;
using ServerBase.Protocol;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using UtilPublic.ApiDispatcher;
using UtilPublic.Serialization;

namespace ToolClient
{
    /// <summary>
    /// PageDebug.xaml 的交互逻辑
    /// </summary>
    public partial class PageDebug : Page
    {
        public PageDebug()
        {
            InitializeComponent();

            TextBoxDebug.Text = App.TxtDebug;

            App.PgDebug = this;

            MainWindow.绑定控制器(this);
        }
        private void Button_Click_Debug1(object sender, RoutedEventArgs e)
        {
            var Req = new C2G_Info_GetAll() { };
            App.ClientNetGame.Send(Req);
        }
        private void Button_Click_Debug2(object sender, RoutedEventArgs e)
        {
            var Req = new C2G_Info_GetAll() { };
            App.ClientNetGame.Send(Req);
        }
        private void Button_Click_Debug3(object sender, RoutedEventArgs e)
        {
            var Req = new C2G_Info_GetAll() { };
            App.ClientNetGame.Send(Req);
        }
        private void Button_Click_Debug4(object sender, RoutedEventArgs e)
        {
            var Req = new C2G_Info_GetAll() { };
            App.ClientNetGame.Send(Req);
        }
        private void Button_Click_Debug5(object sender, RoutedEventArgs e)
        {
            var Req = new C2G_Info_GetAll() { };
            App.ClientNetGame.Send(Req);
        }
        [ApiDpPro((short)EProtocolId.L2C_LOGIN_NOTICESYSTEM)]
        public short OnRspDebug1()
        {
            var Rsp = LunarClientDispatcher.OnMsg.To<L2C_Login_NoticeSystem>();
            App.DebugDebug(Jsh.Jstr(Rsp));
            return 0;
        }
        [ApiDpPro((short)EProtocolId.L2C_LOGIN_NOTICEACTIVITY)]
        public short OnRspDebug2()
        {
            var Rsp = LunarClientDispatcher.OnMsg.To<L2C_Login_NoticeActivity>();
            App.DebugDebug(Jsh.Jstr(Rsp));
            return 0;
        }
    }
}
